package com.none.Plugin.SpashPlugin;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;

import com.none.staff.event.AppEvent;

import de.greenrobot.event.EventBus;

/**
 * 取消splash插件
 * @author willis
 *
 */
public class CancelSpashPlugin extends CordovaPlugin {

	@Override
	public boolean execute(String action, JSONArray args,
			CallbackContext callbackContext) throws JSONException {
		if (action.equals("splashHide")) {
			EventBus.getDefault().post(new AppEvent(1));
			callbackContext.success("hide sucdess");
			// return super.execute(action, args, callbackContext);
			return true;
		}
		return false;
	}

}
